1
สถาปัตยกรรมแบบเน้นไฟล์ Markdown และโครงสร้างพื้นฐานหลัก
EvoClass-AI007Lesson 3
00:00

ปรัชญาของ "ไฟล์คือความจริง"

รากฐานของ OpenClaw คือ ปรัชญาแบบเน้นไฟล์ Markdown. แตกต่างจากระบบที่ใช้ปัญญาประดิษฐ์แบบกล่องดำทั่วไป ซึ่ง OpenClaw พิจารณาการตั้งค่าเป็นเอกสารประกอบ ทุกแง่มุมของตัวแทน—บุคลิกภาพ ความสามารถ และกระบวนการดำเนินงาน—ถูกจัดเก็บไว้ในไฟล์ Markdown ที่อ่านได้โดยมนุษย์ ทำให้มั่นใจได้ว่า "แหล่งข้อมูลที่แท้จริง" นั้นโปร่งใส มีการควบคุมเวอร์ชัน และสามารถแก้ไขได้ง่ายทั้งโดยมนุษย์และโมเดลปัญญาประดิษฐ์

  • SOUL.md: คือตัวตนหลักและแนวทางศีลธรรม
  • SKILL.md: คือรายการที่กำหนดว่าตัวแทนสามารถทำอะไรได้จริง
  • AGENTS.md: คือแผนผังวิศวกรรมสำหรับการประสานงานหลายตัวแทน

ชุดโครงสร้างพื้นฐานหลัก

เพื่อเปลี่ยนจากไฟล์คงที่ไปเป็นตัวแทนที่มีชีวิต โอเพนคลอว์ใช้สถาปัตยกรรมเบื้องหลังที่แข็งแรง ออกแบบมาเพื่อความมั่นคงและความยืดหยุ่น:

  1. เอเจนต์เรนท์ไทม์: ห้องเครื่องที่จัดการกับ ระบบลำดับงาน. ช่วยให้การทำงานแบบไม่พร้อมกันดำเนินไปโดยไม่ก่อให้เกิด ความเสียหายของสถานะโดยรักษา การแยกเซสชัน ตลอดการโต้ตอบทุกครั้ง
  2. เกตเวย์: หน่วยงานควบคุมที่จัดการตัวตนเครือข่ายและการจัดเส้นทางโมเดล มีหน้าที่เป็นเกราะป้องกันความปลอดภัย ลดความเสี่ยงเช่น การดำเนินการโค้ดจากระยะไกล (RCE) บนโปรโตคอล WebSocket
  3. ชั้นเครื่องมือ: คืออินเทอร์เฟซแบบโมดูลาร์ ที่ตัวแทนเชื่อมต่อกับฟังก์ชันภายนอก โปรแกรม API และสคริปต์ท้องถิ่น ที่กำหนดไว้ในไฟล์ทักษะ
  4. เครื่องมือที่ไม่พึ่งพาโมเดลเฉพาะ: ระบบไม่ถูกจำกัดให้ใช้ผู้ให้บริการเดียว สามารถสลับระหว่างโมเดล Claude, GPT หรือโมเดลท้องถิ่นได้ผ่าน openclaw.json ตัวจัดเส้นทาง
  5. พื้นที่และช่องทาง: คือจุดที่ตัวแทนโต้ตอบกับผู้ใช้ (UI บนเว็บ คอมมานด์ไลน์ หรือมือถือ)
ตั้งค่า: openclaw.json
{ "network_identity": "agent-01-alpha", "model_routing": { "primary": "anthropic/claude-3-opus", "fallback": "local/llama-3-8b" }, "env_injection": { "secure_pass": true, "policy": "prevent_leakage" } }
Type a command...
Question 1
Why does OpenClaw prioritize a Markdown-First Philosophy?
To make the files look better in a text editor.
To ensure the configuration serves as the definitive, human-readable source of truth.
To bypass the need for an LLM during execution.
Question 2
Which component is responsible for preventing State Corruption during multi-agent tasks?
The Tools Layer
The Gateway
The Agent Runtime (via Lane Queue)
Challenge: Security Breach
Mitigating RCE risks on public channels.
Scenario: You are deploying an agent to a public-facing Discord channel. You notice that the agent is trying to execute unverified shell commands, creating an RCE (Remote Code Execution) risk.
Secure
How do you use the Gateway and SKILL.md to secure the infrastructure?
Solution:
1. Gateway Level: Restrict the WebSocket API port (18789) to local traffic only or implement strict authentication tokens.
2. SKILL.md Level: Define strict "Permissions" in the YAML metadata for the Tools Layer.
3. Instruction Level: Update the Six-Layer Filtering Funnel within the skill manifest to reject any command string that contains sensitive shell operators.